Skip to content

fix(release): sign updater compatibility metadata without a trailing newline - #40

Merged
kalvinnchau merged 1 commit into
mainfrom
fix/updater-compatibility-signature
Aug 14, 2026
Merged

fix(release): sign updater compatibility metadata without a trailing newline#40
kalvinnchau merged 1 commit into
mainfrom
fix/updater-compatibility-signature

Conversation

@kalvinnchau

Copy link
Copy Markdown
Collaborator

Summary

Category: fix

User Impact: Future desktop releases can be installed from older Berd versions without a false compatibility-signature failure.

Problem: The release script signed compact compatibility JSON with a trailing newline, while the updater verifies the same JSON serialized without that newline. The one-byte mismatch caused valid release metadata to fail closed during update checks.

Solution: Emit raw compact JSON with jq -cjn so the producer signs the updater's canonical bytes, and cover the exact payload passed to the signer with a regression test.

File changes

scripts/release/sign-compatibility-descriptor.sh
Emit the compatibility descriptor without a trailing newline so its signed bytes match updater verification.

scripts/release/tests/release-scripts.test.mjs
Capture the signer's input and assert it is the exact compact, newline-free canonical payload expected by the updater.

Related issue

None found.

Testing

  • pnpm test:release-scripts
  • just ci

@kalvinnchau
kalvinnchau requested a review from a team August 14, 2026 20:36
@kalvinnchau kalvinnchau changed the title sign updater compatibility metadata without a trailing newline fix(release): sign updater compatibility metadata without a trailing newline Aug 14, 2026
@kalvinnchau
kalvinnchau merged commit a490e37 into main Aug 14, 2026
9 checks passed
@kalvinnchau
kalvinnchau deleted the fix/updater-compatibility-signature branch August 14, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant